/*
 *
 * SimplePCR1000 (Qt4) Version 1.x
 * Copyright (C) 2011  Tyler H. Jones (me@tylerjones.me)
 * http://www.thebasementserver.com/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */


#ifndef RADIOCONTROLLER_H
#define RADIOCONTROLLER_H

#include "common.h"
#include "QSerialPort/qserialport.h"
#include "QSerialPort/qserialportinfo.h"
#include "QSerialPort/qserialportglobal.h"

QT_USE_NAMESPACE

class RadioController : public QObject
{
    Q_OBJECT

public:
    RadioController();
    virtual ~RadioController();
    void Open(QString portname);
    void Close();
    void Write(QString data);
    QString Read();
    void setPower(bool state);
    bool getPower();
    bool IsRadioConnected();
    bool setFreqModeFilter(QString freq, QString mode, QString filter);
    void setVolume(int val);
    void setSquelch(int val);
    void setIFShift(int val);
    void setAGC(bool val);
    void setVSC(bool val);
    void setNoiseBlanking(bool val);
    void setAtten(bool val);
    QString curFreq;
    QString getSignal();


private:
    QSerialPort *port;
    Common COM;

};


#endif // RADIOCONTROLLER_H
